<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/common/head.jsp"%>
<!DOCTYPE html>

<div class="container mt-5">
        <div class="row tm-content-row">
            <div class="col-sm-12 col-md-12 col-lg-8 col-xl-12 tm-block-col">
                <div class="tm-bg-primary-dark tm-block tm-block-products">
                    <h3 style="color: white">计划列表</h3>
                   <div class="">
                       <form method="post" action="${pageContext.request.contextPath }/accounts2/accounts2.do">
                           <input placeholder="请输入客户关键字" name="method" class="form-control  w-25" style="float: left;">
                           
                           <div id="s1" style="float: left;">企业名称：</div>
                           <select name="queryUserRole" class="custom-select w-25" style="float:left">
                               <option value="0">--请选择--</option>
                               <c:forEach var="role" items="${accounts1}">
                                   <option>${accounts.e_name}</option>
                               </c:forEach>
                           </select>
                           
                           <input	class="btn btn-info" value="查 询" type="submit" id="searchbutton">
                       </form>

                   </div>
                    <div class="tm-product-table-container">
                        <table class="table table-hover tm-table-small tm-product-table">
                            <thead>
                            <tr>
                                <th scope="col">&nbsp;</th>
                                <th scope="col">合同信息</th>
                                <th scope="col">合同期数</th>
                                <th scope="col">企业名称</th>
                                <th scope="col">合同编号</th>
                                <th scope="col">计划回款（元）</th>
                                <th scope="col">实际回款（元）</th>
                                <th scope="col">签订人</th>
                                <th scope="col">状态</th>
                                <th scope="col">修改</th>
                                <th scope="col">删除</th>
                            </tr>
                            </thead>
                            <tbody>
                            <c:forEach var="plane" items="${accounts2 }" varStatus="status">
                                <tr>
                                    <th scope="row"><input type="checkbox" name="p_id" value="${plane.p_id}"/></th>
                                    <td>
                                        <span>${plane.t_information}</span>
                                    </td>
                                    <td>
                                    <span>
                                        <c:if test="${plane.t_clauses==1}">第一期</c:if>
                                        <c:if test="${plane.t_clauses==2}">第二期</c:if>
                                    </span>

                                    </td>
                                    <td>
                                        <span>${plane.e_name}</span>
                                    </td>
                                    <td>
                                        <span>${plane.t_no}</span>
                                    </td>
                                    <td>
                                        <span>${plane.t_plane}</span>
                                    </td>
                                    <td>
                                        <span>${plane.t_actual}</span>
                                    </td>
                                    <td>
                                        <span>${plane.t_person}</span>
                                    </td>
                                    <td>
                                    <span>
                                        <c:if test="${plane.t_state==1}">未签</c:if>
                                        <c:if test="${plane.t_state==2}">已签</c:if>
                                    </span>

                                    </td>
                                    <td>
                                        <button type="button" class="tm-product-delete-link modify" data-toggle="modal" data-target="#myModal"  >
                                            <i class="far fa fa-edit tm-product-delete-icon" p_id="${plane.p_id}"></i>
                                        </button>
                                        <div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="top:210px" >
                                            <div class="modal-dialog" role="document">
                                                <div class="modal-content">
                                                    <div class="modal-header">
                                                        <h4 class="modal-title" id="myModalLabel">计划修改框</h4>
                                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                                    </div>
                                                    <form action="${pageContext.request.contextPath }/accounts2/update.do">
                                                        <div class="modal-body">
                                                            <table style="text-align: left;margin-left: 80px">
                                                                <input type="hidden" id="d" name="p_id" required>
                                                                <tr>
                                                                    <td>合同信息:</td>
                                                                    <td><input type="text" name="t_information" id="t_information" value="" required></td>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td>合同期数:</td>
                                                                    <td>
                                                                        <select>
                                                                 <option test="${plane.t_clauses==1}">第一期</option>
                                                                 <option test="${plane.t_clauses==2}">第二期</option>
                                                                        </select></td>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td>状态:</td>
                                                                    <td>
                                                                        <select>
                                                                 <option test="${plane.t_state==1}">未签</option>
                                                                 <option test="${plane.t_state==2}">已签</option>
                                                                        </select>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>签订人:</td>
                                                                    <td><input type="text" name="t_person" id="t_person" value="" required></td>
                                                                    <td></td>
                                                                </tr>

                                                            </table>
                                                        </div>
                                                        <div class="modal-footer">
                                                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                                            <button type="submit" class="btn btn-primary">确定</button>
                                                        </div>
                                                    </form >
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td>
                                        <button type="button" class="tm-product-delete-link" fid="${f.f_id}" >
                                            <i class="far fa-trash-alt tm-product-delete-icon"></i>
                                        </button>
                                    </td>
                                </tr>
                            </c:forEach>
                            </tbody>
                        </table>
                    </div>
                    <!-- table container -->
                    <div >
                        <ul class="page-num-ul clearfix" style="float: left" >
                            <input type="hidden" id="totalPageCount" value="${totalPageCount}"/>
                            <c:import url="rollpage.jsp">
                                <c:param name="totalCount" value="${totalCount}"/>
                                <c:param name="currentPageNo" value="${currentPageNo}"/>
                                <c:param name="totalPageCount" value="${totalPageCount}"/>
                            </c:import>
                        </ul>
                        <button class="btn btn-primary btn-block text-uppercase w-25 fa-pull-right" style="float: right">
                            删除所选
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>




<%@ include file="/WEB-INF/jsp/common/foot.jsp" %>
